Finally block will be executed irrespective of exception, while executing the code in try block when exception is occurred then control is returned to catch block then in the last “finally” block will be executed the closing connection to database / releasing the file handlers can be kept in “finally” block.
Liked By
Write Answer
Why to use “finally” block in C#?
Join MindStick Community
You have need login or register for voting of answers or question.
Anonymous User
28-May-2018Finally block will be executed irrespective of exception, while executing the code in try block when exception is occurred then control is returned to catch block then in the last “finally” block will be executed the closing connection to database / releasing the file handlers can be kept in “finally” block.